import numpy as np
from ldp_searching import LDP_Searching
from drawcluster2 import drawcluster2

def run_ldp_t7():
    """
    读取 t7.txt 数据并执行 LDP_Searching
    """
    A = np.loadtxt(r'F:\A-Project\Python\LDP-MST\LDP-MST\synthetic data sets\t7.txt')
    N, dim = A.shape
    print(f'读入数据：{N} 个点，{dim} 维')

    index, supk, nb, rho, local_core, cores, cl, cluster_number = LDP_Searching(A, visualize=False)
    # 绘制 搜索局部密度峰 结果
    drawcluster2(A, cl, int(cl.max()))


if __name__ == '__main__':
    run_ldp_t7()
